package com.xhwl.data.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.devplatform.Module;
import com.xhwl.common.query.cent.sdata.devplatform.ModuleQuery;
import com.xhwl.data.service.devplatform.IModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 模块
 *
 * @Author yf
 * @Description:
 * @Date Create in 14:13 2022/11/24
 */
@RestController
@RequestMapping("/module")
public class ModuleController {

    @Autowired
    private IModuleService moduleService;

    /**
     * 分页
     *
     * @param query
     * @return
     */
    @PostMapping("/page")
    public ResultJson<Page<Module>> page(@RequestBody ModuleQuery query) {
        return ResultJson.success(moduleService.page(query));
    }
}
